//导入高阶函数
import { createStore, applyMiddleware } from "redux";
//导入下面的子模块
import reducer from './reducers'
// 导入redux-thunk
import reduxThunk from "redux-thunk";
// 引入 `routerMiddleware` 通过 `history` 生成一个实例。
// import {syncHistoryWithStore, routerMiddleware } from 'react-router-redux'
// import { BrowserRouter } from "react-router-dom";
// import thunk from "redux-thunk";
// const middleware = routerMiddleware(BrowserRouter)
// const store = createStore(
//     reducer,
//     applyMiddleware(middleware),
//     applyMiddleware(thunk)
// )
//抛出
export default createStore(reducer, applyMiddleware(reduxThunk))